
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--block_head-->
<!--block_head-->
  <link link href="_/css/grids-min.css" rel="stylesheet" type="text/css" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
  <link link href="_/css/v3.css" rel="stylesheet" type="text/css" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
  <link link href="_/css/downloads.css" rel="stylesheet" type="text/css" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
  <link href='https://fonts.googleapis.com/css?family=Exo:700,700italic|Average' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="_/css/mystyle.css">
  <script type="text/javascript" src="_/js/jquery-1.8.2.min.js"></script>
  <script type="text/javascript" src="_/js/myscript.js"></script>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<?php 
	require_once("database.php");
	require_once("facebook_include1.php");
	?>
<?php
    require_once("./config.php");
    $me = $facebook->api('/me');
    $access_token = $facebook->getAccessToken();
    $user = $facebook->getUser();
    $userId = get_uid_only($access_token);
	
	
?>

<?php
login($access_token);
?>
<?php
    
    
    $isSender = findIfSender($userId);
    $gameState = $_GET['message'];
    $message = "";
    if($gameState == 0)
		$message = "You have not been paired yet. Please wait for a mail from the administrator. You will be notified once you have been selected to play the game.";
	if($gameState == 1 && $isSender == False)
		$message = "The sender has not responded yet. Please wait for a mail from the administrator. You will be notified when the sender responds.";
	if($gameState == 2 && $isSender == True)
		$message = "You have already played your role in the game. Please wait for the receiver to respond. You will receive a mail when the receiver completes the game. Thanks !!! "; 
	if($gameState == 3)
		$message = "The game is complete. Please wait for the mail from the administrator regarding your reward. Thanks !!!";
	if($gameState == 4)
		$message = "The game has expired. Please wait for a mail from the administrator. You may be selected again and paired with some other user. ";
    
?>
</head>
<body>
<div id="doc" style="width:700px; padding-left:0px; margin-left:0px"> 
	   <div id="bd">
	   		<div id="yui-main"> 
				<div class="yui-b">
					<div class="yui-g">
						<div class="pageHeading" style="padding:0px 0px 15px 0px;">Online Token Sharing Game</div>
						<div id="registered">
							<div class="sectionBodyText">
								<p class="font4"><?php echo $message ?></p>
							</div>
						</div>
					</div>
				</div>
	   		</div> 
	   </div>  
</div>
</body>

</html>
